<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2016/8/16
 * Time: 10:12
 */
class Involved_FactoryModel extends BaseModel
{
    protected $table = 'factory';
    public function FactoryList(){
        return DB::table($this->table)
            ->select('factory_id','factory_name','contact_name', 'phone', 'address','email','postcord','remarks','picture','place')
            ->orderBy('factory_id','desc')
            ->get();
    }
    public function GetFactoryInfo($id)
    {
        return DB::table($this->table)->where('factory_id',$id)->first();
    }

    /**
     * @return mixed
     * 钢厂下拉菜单
     */
    public function SelectFactory()
    {
        return DB::table($this->table)
            ->select('factory_id','factory_name')
            ->get();
    }


}
